﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace DAL
{
    public class SysCode
    {
        public static DataTable list(string bm)
        {
            return DbHelper.ExecuteDataTable("p_SysCode_list", bm);
        }

        public static SysCodeEntity getByXmAndBm(string xm, string bm)
        {
            DataRow dr = DbHelper.ExecuteDataRow("p_SysCode_getByxm", xm, bm);
            SysCodeEntity scod = new SysCodeEntity();
            if (dr != null)
            {
                scod.Bm = bm;
                scod.Xm = xm;
                scod.Name = dr["name"].ToString();
                scod.Sort = Convert.ToInt16(dr["sort"]);
                scod.IsShow = Convert.ToBoolean(dr["isShow"]);
            }
            return scod;
        }
        public static DataTable listWithPayStatus(string type)
        {
            return DbHelper.ExecuteDataTable("p_SysCode_listWithPayStatus", type);
        }
    }
}
